import request from '@/utils/request'

// 搜索专业列表
export function searching (queryParams) {
  return request({
    url: '/majors/majors/select',
    method: 'post',
    data: queryParams
  })
}

// 添加专业
export function addPost (data) {
  return request({
    url: '/majors/majors/insert',
    method: 'post',
    data: data
  })
}

// 修改岗位  Modifying forms
export function updatePost (data) {
  return request({
    url: '/majors/majors/update',
    method: 'post',
    data: data
  })
}

// // 删除岗位
// export function delPost (data) {
//   return request({
//     url: '/majors/majors/delete',
//     method: 'post'
//   })
// }

// 删除岗位
export function delPost (postId) {
  return request({
    url: '/majors/majors/' + postId,
    method: 'delete'
  })
}

// 查询岗位列表
export function listPost (query) {
  return request({
    url: '/majors/majors/list',
    method: 'get',
    params: query
  })
}
